Skip to content

FastHTML examples #496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 3, 2024
Merged

FastHTML examples #496

merged 2 commits into from
Sep 3, 2024

Conversation

stephenhibbert
Copy link
Contributor

@stephenhibbert stephenhibbert commented Sep 3, 2024

#495

Added four new FastHTML examples

  • FastHTML - examples/fasthtml
  • FastHTML in Zip - examples/fasthtml-zip
  • FastHTML with Response Streaming - examples/fasthtml-response-streaming
  • FastHTML with Response Streaming in Zip - examples/fasthtml-response-streaming-zip

For streaming, using HTMX chunked transfer extension. With HTMX it's also possible to do polling or websockets (don't think that's supported on aws-lambda-web-adapter?)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -0,0 +1,62 @@
from anthropic import AnthropicBedrock
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to use AnthropicBedrock instead of boto3? If you need to use it, the README and requirementes.txt should be updated .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have made the correction, I prefer to use it because of the simple streaming support and making it easier to use the Instructor module for structured output. The trade off is naturally it restricts the models to Anthropic only.

@bnusunny
Copy link
Contributor

bnusunny commented Sep 3, 2024

Thanks for the contribution!

@bnusunny bnusunny merged commit ee72441 into awslabs:main Sep 3, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants